package com.hujiheng.paike.mapper;

import com.hujiheng.paike.pojo.Course;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("courseMapper")
public interface CourseMapper {
    /*
    根据课程ID 查询课程信息
    根据课程名称查询课程信息
     */
    Course getCourseById(@Param("courseId")int courseId);
    Course getCourseByName(@Param("courseName")String courseName);

    List<Course> getCourseList();

    int addCourse(@Param("course") Course course);

    int delCourse(@Param("courseId") int courseId);
}
